<!--  -->
<template>
  <div class="content">
    <el-form :model="active" ref="activeForm" label-width="100px" class="demo-ruleForm">
      <div class="left">
        <div class="user-password">
          <el-form-item label="User" prop="user">
            <el-input v-model="active.name" style="width:200px"></el-input>
          </el-form-item>
          <el-form-item label="Password" prop="password">
            <el-input v-model="active.password" style="width:200px"></el-input>
          </el-form-item>
        </div>
        <el-form-item label="Hlrsn" prop="hlrsn">
          <el-input v-model="active.hlrsn" style="width:200px"></el-input>
        </el-form-item>
        <el-form-item label="IMSI" prop="imsi">
          <el-input v-model="active.imsi" style="width:200px"></el-input>
        </el-form-item>
        <el-form-item label="ISDN" prop="isdn">
          <el-input v-model="active.isdn" style="width:200px"></el-input>
        </el-form-item>
      </div>
      <div class="right">
        <el-form-item label="业务" v-for="(item,i) in active.work" :key="i">
          <!-- <el-select v-model="item.key" style="width:200px">
            <el-option label="业务一" value="1"></el-option>
            <el-option label="业务二" value="2"></el-option>
          </el-select>
          <i
            style="font-size:20px;text-align: center;margin-left:10px;margin-top:10px"
            class="outline el-icon-circle-plus-outline"
            @click="addInput()"
          ></i>-->
          <el-input
            style="width:400px;display:block;"
            type="textarea"
            :autosize="{ minRows: 10}"
            placeholder="请输入内容"
            v-model="item.value"
          ></el-input>
          <!-- <i
              class="el-icon-remove-outline"
              style="margin-top:20px;margin-left:10px"
              @click="remove()"
          ></i>-->
        </el-form-item>
      </div>
    </el-form>
    <div class="bottom">
      <el-button type="primary">发送</el-button>
      <el-button type="success">取消</el-button>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  props: ["active"],
  data() {
    return {};
  },
  components: {},
  computed: {},
  beforeMount() {},
  mounted() {},
  methods: {
    addInput() {
      let arr = { key: "", value: "" };
      this.active.work.push(arr);
      console.log(this.active.work);
    },
    remove() {
      if (this.active.work.length != 1) {
        this.active.work.pop();
      } else {
        this.$message({
          message: "这是最后一条业务！！",
          type: "warning"
        });
      }
    }
  },
  watch: {}
};
</script>

<style scoped>
.box-card {
  margin: 10px;
}
.user-password {
  display: flex;
}
.bottom {
  width: 100%;
  display: flex;
  justify-content: center;
}
.result {
  font-size: 15px;
}
.demo-ruleForm {
  display: flex;
  justify-content: space-between;
  width: 80%;
}
.el-textarea__inner{
  min-height: 400px !important;
}
</style>